package cn.edu.nju.askinginhand.constant;

import java.io.File;

import android.os.Environment;

public class TempFilePath {

	public static String getAudioFilePath() {
		String filePath = null;
		if (hasSDCard()
				&& Environment.MEDIA_MOUNTED.equals(Environment
						.getExternalStorageState())) {
			File sdcardDir = Environment.getExternalStorageDirectory();
			filePath = sdcardDir.getPath() + "/askinhand.amr";
		}
		return filePath;
	}

	private static boolean hasSDCard() {
		String status = Environment.getExternalStorageState();
		if (status.equals(Environment.MEDIA_MOUNTED)) {
			return true;
		} else {
			return false;
		}
	}
}
